<?php 
class Admin_Controller extends MY_Controller {
	function __construct(){
		parent::__construct();
		$this->load->helper('form');
		$this->load->library('form_validation');
		$this->load->model('user_m');
		$this->load->library('session');
		
		//check user loggin
		$exception_uris=array('user/login','user/logout');
		if(in_array(uri_string(),$exception_uris)==FALSE){
			if($this->user_m->loggedin()==False){
				redirect('user/login','refresh');
			}
		}
	}
}